<template>
  <div>
    <el-card>
      <div class="user-info">
        <img :src="userStore.avatar" class="user-avatar">
        <div class="user-tips">
          <h3>{{ getTime() }}好{{ userStore.username }}</h3>
          <p>{{ setting.title }}</p>
        </div>
      </div>
    </el-card>
    <div class="icon-container">
      <svg-icon name="welcome" class="welcome-icon"></svg-icon>
    </div>
  </div>
</template>

<script setup lang="ts">
import useUserStore from '@/store/modules/user';
import setting from '@/setting';
import { getTime } from '@/utils/time';
const userStore = useUserStore();
</script>

<style scoped lang="scss">
.user-info {
  display: flex;

  .user-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
  }

  .user-tips {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    justify-content: space-evenly;

    h3 {
      font-size: 30px;
      font-weight: bold;
    }

    p {
      font-size: 18px;
      font-style: italic;
      color: #999;
    }
  }
}

.icon-container {
  display: flex;
  justify-content: center;

  .welcome-icon {
    width: 900px;
    height: 450px;
    margin-top: 100px;
  }
}
</style>
